# coding: utf-8
# 修正默认编码问题
fp = open('cafe.txt', 'w', encoding='utf_8')
print(fp)
fp.write('café')
fp.close()
import os
print(os.stat('cafe.txt').st_size)
print()
fp2 = open('cafe.txt')
print(fp2)
print(fp2.encoding)
print(fp2.read())
print()
fp3 = open('cafe.txt', encoding='utf_8')
print(fp3)
print(fp3.read())
print()
fp4 = open('cafe.txt', 'rb')
print(fp4)
print(fp4.read())
